<script>
  import CharCreation from './CharCreation.svelte';
  import Game from './Game.svelte';
  import GameOver from './GameOver.svelte';
  import { newGame } from './game';

//  const games = listSaves();

  let game = $state(undefined);
</script>

{#if game === undefined}
  <CharCreation bind:game />
{:else if game?.over}
  <GameOver bind:game />
{:else}
  <Game bind:game />
{/if}

<style>
</style>
